package org.zhi.scala03

/**
 * @className: ScalaDemo1
 * @author: Administrator
 * @date: 2025-02-26 18:12
 */
case class User(username:String,password:String)
object ScalaDemo1 {
//集合
  def main(args: Array[String]): Unit = {
    try{
      print("请输入用户名：")
      val username = scala.io.StdIn.readLine()
      print("请输入密码：")
      val password = scala.io.StdIn.readLine()
      val user = User(username, password)

      print(s"信息：${user}")
//      val userPass = Source.formFile

    } catch {
      case e: Exception => println(s"错误: ${e.getMessage}")  // 异常处理‌:ml-citation{ref="1,3" data="citationList"}
    }
  }
}
